package superbubble.entry;

public class Edge {
	
	private int startLink;
	private int endLink;
	private int weight;
	private boolean backedge;
	
	public Edge(int startLink, int endLink, int weight) {
		this.startLink = startLink;
		this.endLink = endLink;
		this.weight = weight;
		this.backedge = false;
	}

	public boolean isBackedge() {
		return backedge;
	}

	public void setBackedge(boolean backedge) {
		this.backedge = backedge;
	}

	public int getStartLink() {
		return startLink;
	}

	public void setStartLink(int startLink) {
		this.startLink = startLink;
	}

	public int getEndLink() {
		return endLink;
	}

	public void setEndLink(int endLink) {
		this.endLink = endLink;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + endLink;
		result = prime * result + startLink;
		result = prime * result + weight;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Edge other = (Edge) obj;
		if (endLink != other.endLink)
			return false;
		if (startLink != other.startLink)
			return false;
		if (weight != other.weight)
			return false;
		return true;
	}

}
